package com.tanhua.dubbo.api;

import com.tanhua.model.enums.CommentType;
import com.tanhua.model.mongo.UserFocus;
import com.tanhua.model.mongo.Video;
import com.tanhua.model.mongo.VideoComment;
import com.tanhua.model.vo.PageResult;
import org.bson.types.ObjectId;

import java.util.List;

public interface VideoApi {

    //保存视频
    String save(Video video);

    //根据vid查询数据列表
    List<Video> findMovementsByVids(List<Long> vids);

    //分页查询数据列表
    List<Video> queryVideoList(int page, Integer pagesize);

    //根据用户id查询
    PageResult findByUserId(Integer page, Integer pagesize, Long userId);

    //分页查询小视频评论列表
    List<VideoComment> findComments(ObjectId videoId, CommentType comment, Integer page, Integer pagesize);

    //判断视频用户是否关注
    Boolean isFocus(Long userId, Long uid);

    //视频用户关注数据保存
    Long focusUser(UserFocus userFocus);

    //视频用户关注数据删除
    Long  unFocusUser(UserFocus userFocus);

    /*//修改视频点赞，评论，关注数量
    void updateCount(String videoId, Integer commentType,Integer num);*/
}
